package edu.example.paperselection;

public class Student {
    private final String name;
    private final int preferredQuantity;
    private final PaperType preferredType;
    private boolean hasSelected = false;

    public Student(String name, int preferredQuantity, PaperType preferredType) {
        if (preferredQuantity < 1 || preferredQuantity > 4) {
            throw new IllegalArgumentException("期望数量必须在 1-4 之间");
        }
        this.name = name;
        this.preferredQuantity = preferredQuantity;
        this.preferredType = preferredType;
    }

    public String getName() {
        return name;
    }

    public int getPreferredQuantity() {
        return preferredQuantity;
    }

    public PaperType getPreferredType() {
        return preferredType;
    }

    public boolean hasSelectedPapers() {
        return hasSelected;
    }

    public void markAsSelected() {
        this.hasSelected = true;
    }
}